using System;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

    /// <summary>
    /// 管理员授权表（其他身份验证）
    /// </summary>
    [Table(Name = "sys_manager_identity")]
    public class SysManagerIdentity
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 管理员编码编码
        /// </summary>
        [Column(Name = "manager_id", OldName = "user_id")]
        public Guid? ManagerId { get; set; }

        /// <summary>
		/// 例如 用户明类型的情况下，存密码，其他的不用写该值
		/// </summary>
		[Column(Name = "credential", StringLength = 100)]
        public string Credential { get; set; }

        /// <summary>
        /// 认证者，例如 用户名（PassWord认证类型）,授权得到的昵称(QQ ),授权得到的用户名（唯一，GitHub) 微信小程序的 OpenId、
        /// </summary>
        [Column(Name = "identifier", StringLength = 30)]
        public string Identifier { get; set; }

        /// <summary>
        /// 认证类型，如 Password，GitHub、QQ、WeiXin、PhoneNumber等
        /// </summary>
        [Column(Name = "identity_type", StringLength = 50)]
        public string IdentityType { get; set; }

        /// <summary>
        ///  添加时间
        /// </summary>
        [Column(Name = "add_time")]
        public DateTime AddTime { get; set; }

        /// <summary>
        ///  描述
        /// </summary>
        [Column(Name = "remark", StringLength = 100)]
        public string Remark { get; set; }


        #region 外键 => 导航属性，ManyToOne/OneToOne


        public virtual SysManager Manager { get; set; }

        #endregion

        #region 外键 => 导航属性，ManyToMany

        #endregion
    }

}
